package timing;

import java.awt.Desktop;
import java.io.File;
 
//Cross platform solution to view a PDF file
public class AnyPlatformAppPDF {
 
	public static void main(String[] args) {
 
	  try {
 
		File pdfFile = new File(Program.tempDir +"Timing4.07-statystyki_2014-09-02_23-27-32.pdf");
		if (pdfFile.exists()) {
 
			if (Desktop.isDesktopSupported()) {
				Desktop.getDesktop().open(pdfFile);
			} else {
				System.out.println("Awt Desktop is not supported!");
			}
 
		} else {
			System.out.println("File is not exists!");
		}
 
		System.out.println("Done");
 
	  } catch (Exception ex) {
		ex.printStackTrace();
	  }
 
	}
}